package org.example.classtopia.Repository;

import org.example.classtopia.Model.Entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface UserRepository extends JpaRepository<User, Long> {
    Page<User> findAllByStatus(Integer status, Pageable pageable);

    User findByNickname(String nickname); // 用于登录时通过账号查找用户
}
